<!doctype html>
<html>
    <head>
        <title>HT for Web 边框面板手册</title>
        <meta charset="UTF-8">    
        <meta name="viewport" content="user-scalable=yes, width=1024">
        <style type="text/css"> 
            h1, h2, h3, h4, h5, h6, p, blockquote {
                margin: 0;
                padding: 0;
            }
            body {
                font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif;
                font-size: 13px;
                line-height: 18px;
                color: #737373;
                background-color: white; 
                margin: 10px 13px 10px 13px;
            }
            table {
                margin: 10px 0 15px 0;
                border-collapse: collapse;
            }
            td,th {	
                border: 1px solid #ddd;
                padding: 3px 10px;
            }
            th {
                padding: 5px 10px;	
            }
            a {
                color: #0069d6;
            }
            a:hover {
                color: #0050a3;
                text-decoration: none;
            }
            a img {
                border: none;
            }
            p {
                margin-bottom: 9px;
            }
            h1, h2, h3, h4, h5, h6 {
                color: #404040;
                line-height: 36px;
            }
            h1 {
                margin-bottom: 18px;
                font-size: 30px;
            }
            h2 {
                font-size: 24px;
            }
            h3 {
                font-size: 18px;
            }
            h4 {
                font-size: 16px;
            }
            h5 {
                font-size: 14px;
            }
            h6 {
                font-size: 13px;
            }
            hr {
                margin: 0 0 19px;
                border: 0;
                border-bottom: 1px solid #ccc;
            }
            blockquote {
                padding: 13px 13px 21px 15px;
                margin-bottom: 18px;
                font-family:georgia,serif;
                font-style: italic;
            }
            blockquote:before {
                content:"\201C";
                font-size:40px;
                margin-left:-10px;
                font-family:georgia,serif;
                color:#eee;
            }
            blockquote p {
                font-size: 14px;
                font-weight: 300;
                line-height: 18px;
                margin-bottom: 0;
                font-style: italic;
            }
            code, pre {
                font-family: Monaco, Andale Mono, Courier New, monospace;
            }
            code {
                background-color: #fee9cc;
                color: rgba(0, 0, 0, 0.75);
                padding: 1px 3px;
                font-size: 12px;
                -webkit-border-radius: 3px;
                -moz-border-radius: 3px;
                border-radius: 3px;
            }
            pre {
                display: block;
                padding: 14px;
                margin: 0 0 18px;
                line-height: 16px;
                font-size: 11px;
                border: 1px solid #d9d9d9;
                white-space: pre-wrap;
                word-wrap: break-word;
            }
            pre code {
                background-color: #fff;
                color:#737373;
                font-size: 11px;
                padding: 0;
            }
            sup {
                font-size: 0.83em;
                vertical-align: super;
                line-height: 0;
            }
            * {
                -webkit-print-color-adjust: exact;
            }
            @media screen and (min-width: 914px) {
                body {
                    width: 854px;
                    margin:10px auto;
                }
            }
            @media print {
                body,code,pre code,h1,h2,h3,h4,h5,h6 {
                    color: black;
                }
                table, pre {
                    page-break-inside: avoid;
                }
            }                        
            iframe{
                width: 100%;
                border: 1px solid #34495E;
                margin: 0;                
            }            
            .logo{
                vertical-align: middle;
            }

        </style>        
        <script>
            function init() {
                var logoSrc = '',
                    logos = document.querySelectorAll('.logo'),
                    i = 0;
                for (; i < logos.length; i++) {
                    logos[i].src = logoSrc;
                }
                
                var iframes = document.querySelectorAll('iframe'),
                    func = function(){};
                for (i=0; i < iframes.length; i++) {
                    var iframe = iframes[i];
                    
                    // a small hack to make it work on android
                    iframe.ontouchstart = func;
                    
                    var div = document.createElement('div');
                    div.innerHTML = '<a href="' + iframe.src + '" target="_blank">独立运行→</a>';
                    iframe.parentNode.insertBefore(div, iframe);
                }   
            }
        </script>    
    </head>
    <body onload="init();">
        <a href="http://www.hightopo.com"><img class="logo"></a>HT for Web 边框面板手册
        <hr style="margin: 1px 0 20px 0">
<p>索引</p>

<ul><li><a href="#ref_overview">概述</a></li><li><a href="#ref_borderpane">边框面板</a></li></ul>

<hr/>

<div id="ref_overview"></div>

<h2>概述</h2>

<p><code>HT for Web</code>提供了边框面板<code>ht.widget.BorderPane</code>的组件布局容器，可在上、下、左、右、中的五个区域位置摆放子组件，
子组件可为<code>HT</code>框架提供的组件，也可为<code>HTML</code>原生组件，子组件以<code>position</code>为<code>absolute</code>方式进行绝对定位。</p>

<p><code>TablePane</code>和<code>TreeTablePane</code>组件内部就是采用<code>BorderPane</code>，对<code>TableView</code>和<code>TableHeader</code>进行布局。</p>

<div id="ref_borderpane"></div>

<h2>边框面板</h2>

<p>边框面板类<code>ht.widget.BorderPane</code>主要可配置属性和函数如下：</p>

<ul><li><code>isDisabled()</code>和<code>setDisabled(true/false, iconURL)</code>获取和设置整个组件处于不可用状态</li><li><code>topHeight</code>顶部组件高度，可通过<code>getTopHeight()/setTopHeight(topHeight)</code>取值和设值</li><li><code>topView</code>顶部组件，可通过<code>getTopView()/setTopView(view, topHeight)</code>取值和设值</li><li><code>bottomHeight</code>底部组件高度，可通过<code>getBottomHeight()/setBottomHeight(bottomHeight)</code>取值和设值</li><li><code>bottomView</code>底部组件，可通过<code>getBottomView()/setBottomView(view, bottomHeight)</code>取值和设值</li><li><code>leftWidth</code>左侧组件宽度，可通过<code>getLeftWidth()/setLeftWidth(leftWidth)</code>取值和设值</li><li><code>leftView</code>左侧组件，可通过<code>getLeftView()/setLeftView(view, leftWidth)</code>取值和设值</li><li><code>rightWidth</code>右侧组件宽度，可通过<code>getRightWidth()/setRightWidth(rightWidth)</code>取值和设值</li><li><code>rightView</code>右侧组件，可通过<code>getRightView()/setRightView(view, rightWidth)</code>取值和设值</li><li><code>centerView</code>中间组件，可通过<code>getCenterView()/setCenterView(value)</code>取值和设值</li></ul>

<p><iframe src="examples/example_basic.html" style="height:300px"></iframe></p>

<p>示例中构建了两个<code>BorderPane</code>对象，其中<code>innerBorder</code>对象嵌套到另外一个的<code>centerView</code>的中间位置：</p>

<pre><code>borderPane = new ht.widget.BorderPane();       
innerBorder = new ht.widget.BorderPane();

innerBorder.setTopView(createDiv(&#39;lightyellow&#39;, &#39;top&#39;), 50);
innerBorder.setBottomView(createDiv(&#39;lightyellow&#39;, &#39;bottom&#39;), 50);
innerBorder.setLeftView(createDiv(&#39;#3498DB&#39;, &#39;left&#39;), 100);
innerBorder.setRightView(createDiv(&#39;#3498DB&#39;, &#39;right&#39;), 100); 
innerBorder.setCenterView(createDiv(&#39;#F4F4F4&#39;, &#39;center&#39;)); 

borderPane.setTopView(createDiv(&#39;#1ABC9C&#39;), 30);
borderPane.setBottomView(createDiv(&#39;#1ABC9C&#39;), 30);
borderPane.setLeftView(createDiv(&#39;#E74C3C&#39;), 50);
borderPane.setRightView(createDiv(&#39;#E74C3C&#39;), 50);  
borderPane.setCenterView(innerBorder);   </code></pre>    <hr id="contact" style="margin: 20px 0 1px 0">
    <a href="http://www.hightopo.com"><img class="logo"></a>欢迎交流 <a href="mailto:service@hightopo.com">service@hightopo.com</a>
</body>
</html>
